<?php

/**
 * SolicitudOrdenCompraInterna form base class.
 *
 * @method SolicitudOrdenCompraInterna getObject() Returns the current form's model object
 *
 * @package    SAC_CLonsa
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseSolicitudOrdenCompraInternaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                      => new sfWidgetFormInputHidden(),
      'item_os_id'              => new sfWidgetFormPropelChoice(array('model' => 'ItemOs', 'add_empty' => false)),
      'orden_compra_interna_id' => new sfWidgetFormPropelChoice(array('model' => 'OrdenCompraInterna', 'add_empty' => true)),
      'observacion'             => new sfWidgetFormTextarea(),
    ));

    $this->setValidators(array(
      'id'                      => new sfValidatorPropelChoice(array('model' => 'SolicitudOrdenCompraInterna', 'column' => 'id', 'required' => false)),
      'item_os_id'              => new sfValidatorPropelChoice(array('model' => 'ItemOs', 'column' => 'id')),
      'orden_compra_interna_id' => new sfValidatorPropelChoice(array('model' => 'OrdenCompraInterna', 'column' => 'id', 'required' => false)),
      'observacion'             => new sfValidatorString(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('solicitud_orden_compra_interna[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'SolicitudOrdenCompraInterna';
  }


}
